1. Field of the Invention
The present invention relates to a communication controller and in particular to a communication controller connected between a network and a host.
2. Description of the Prior Art
Network servers have performed processes involved in communications over a network such as the Internet. Transmission Control Protocol/Internet Protocol (TCP/IP) used as a communication protocol in the Internet places heavy load for processing the protocol on the network server host.
To solve the problem, there is a method in which a number of communication controllers are provided between the host and the network for performing part of TCP/IP processing, thereby reducing the load on the host.
When the communication controller transfers received packets to a host memory, they require descriptors provided by the host central processing unit (CPU). The descriptors represent the address and size of a receive buffer in the host. Typically, descriptors take the form of a chain. The communication controller follows the descriptor chain to read descriptors to perform communication processing.
Difficulties arise in especially offloading processing relating to a connection-oriented protocol such as TCP. Communication processing for such a protocol involves resending of packets and ACK (ACKnowledge) packet processing. Therefore, the communication controller must not only read ahead descriptors along the descriptor chain, but also read previous descriptors in order to perform the communication processing.
Furthermore, when “zero-copy” data transfer is performed in which a received packet is directly transferred into a user data space in order to improve the performance of network processing, as many description chains as TCP connections are required. This adds complexity to descriptor control. Therefore, a technology for speeding up descriptor access control in addition to ensuring ease of descriptor control for the network processor unit in the communication controller.
Prior-art documents describing such technologies include Japanese Patent Laid-Open No. 6-216970 and Japanese Patent Laid-Open No. 7-023060. A communication control adaptor disclosed in Japanese Patent Laid-Open No. 6-2169710 independently generates and sends an acknowledge frame without receiving any request to send an acknowledge frame from its host system so that it can quickly send back the acknowledge frame to the host. However, the prior-art technology is totally different from the present invention in configuration and effect because the prior-art technology does not control descriptors.
A buffer conversion control method disclosed in Japanese Patent Laid-Open No. 7-023060 provides a sending and receiving buffer management conversion table between a buffer management table managed by a protocol controller and a sending and receiving descriptor table managed by a LAN (Local Area Network) controller to allow a sending and receiving buffer to be shared between a LAN adaptor (equivalent to a communication controller of the present invention) and a communication controller (equivalent to a host of the present invention). However, the prior-art method is totally different from the present invention in configuration and effect because the prior-art method does not allow descriptors managed by a host to be cached in the communication controller.
Moreover, prior-art communication controllers have the problem that the processing concerning sending and receiving data to and from a network takes long time because a single processor performs the processing. If the sending and receiving processing to and from the network were distributed among a plurality of processors, the sending and receiving processing for the same connection dispatched to the different processors would require resource contention avoidance and coherency maintenance, thereby increasing complexity of and delay in the processing.
Furthermore, if a communication controller is connected to a fast network such as a Gigabit Ethernet network or has a plurality of ports, more dispatches must be performed in a short period of time and fast dispatch is required.
On the other hand, when a prior-art communication controller performs processing for sending and receiving packets, it must refer to context information defined for each connection. The context information is required for maintaining sending and receiving processing between connections and referred to by a network processor each time packet processing is performed.
Context information typically has a size ranging from as large as 128 bytes to 1K bytes depending on types of protocol. Moreover, the context information is frequently accessed by the network processor. Prior-art communication controllers cannot achieve fast access to such context information and low latency because they obtain necessary context information from a host each time they requires it. Furthermore, as many pieces of context information as connections supported by a communication controller are required. If a large number of connections are supported and connection processing load is distributed among a plurality of network processors in a prior-art communication controller, the performance of the controller is degraded due to load on or contention for memory holding context information.